<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
<div id="app">
    <h1>网站列表</h1>
    <div v-for="site in info">
        {{ site.name }}
    </div>
</div>
<script type = "text/javascript">
    new Vue({
        el: '#app',
        data () {
            return {
                info: null
            }
        },
        mounted () {
            axios
                .get('http://127.0.0.1:8081/getWebSites')
                .then(response => (this.info = response.data.sites))
                .catch(function (error) { // 请求失败处理
                    console.log(error);
                });
        }
    })
</script>
</body>

</html>
